package fag.core.game.space;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

import fag.core.geometry.Circle2D;
import fag.core.geometry.Rectangle2D;
import fag.core.geometry.Vector2D;
import fag.core.model.Animation;
import fag.core.model.Frame;
import fag.core.model.Model;
import fag.core.model.SerializableImage;
import fag.core.model.Sprite;

public class MeteoriteModel extends Model {

	private static final long serialVersionUID = 7888337643468282596L;

	public MeteoriteModel() {
		
		Animation one = new Animation("one");	
		
		Frame f1 = new Frame(1000);
		BufferedImage bufferedImage1 = null;
		
		try {
			bufferedImage1 = ImageIO.read(new File(System.getProperty("user.dir")+"/src/imgs/space/meteorite.jpg"));
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		Sprite s1 = new Sprite(new SerializableImage(bufferedImage1), new Vector2D(-14, -14));
		Circle2D hitbox1 = new Circle2D(0, 0, 14);
		
		f1.setHitbox(hitbox1);
		f1.setSprite(s1);
		f1.updateBounds();
		one.addFrame(f1);
		
		getListAnimation().add(one);
	}
	
}
